#include "constvariable.h"

const QString ServerListenIp = initConfig.getStringValue("Server","ListenIp");

const QString isRelayTest = initConfig.getStringValue("Server","isRelayTest");

const int ServerListenPort = initConfig.getIntValue("Server","ListenPort");

const QString RelayIp = initConfig.getStringValue("Server","RelayIp");

// EnvAvgTemperature 环境平均温度 TODO  动态获取的
const double EnvAvgTemperature = initConfig.getDoubleValue("OtherArgument","EnvAvgTemperature");

const double HorizonMin = initConfig.getDoubleValue("TargetArgument","horizon-min");
const double HorizonMax = initConfig.getDoubleValue("TargetArgument","horizon-max");
const double VerticalMin = initConfig.getDoubleValue("TargetArgument","vertical-min");
const double VerticalMax = initConfig.getDoubleValue("TargetArgument","vertical-max");
const double DistanceOfMach = initConfig.getDoubleValue("TargetArgument","distance-of-mach");
const double DiameterOfBulletPx = initConfig.getDoubleValue("TargetArgument","diameter-of-bullet-px");

const double MaxAvailabilityRangeX = initConfig.getDoubleValue("TargetArgument","max-availability-range-x");

const double MaxAvailabilityRangeY = initConfig.getDoubleValue("TargetArgument","max-availability-range-y");

const double WeightOfTargetPaper = initConfig.getDoubleValue("TargetArgument","width");

const double HeightOfTargetPaper = initConfig.getDoubleValue("TargetArgument","height");

// MaximumWaitTime 最大等待时间
const int MaximumWaitTime = initConfig.getIntValue("OtherArgument","MaximumWaitTime");

//连接状态
//1表示未连接 2表示毁坏 3表示已连接 4表示校准中 5是就绪
const int Unconnected = 1;
const int Breakdown = 2;
const int CommonShooting = 3;
const  int CalibrationTarget = 4;
const int ToBeAssigned = 5;

const QString  LengthOfWriteBackForTargetData = initConfig.getStringValue("BackByte","LengthOfWriteBackForTargetData");

const QString PrefixForWriteBack = initConfig.getStringValue("BackByte","PrefixForWriteBack");

const QString rewriteTargetIdCommand =  initConfig.getStringValue("BackByte","rewriteTargetIdCommand");
const QString clearTargetCommand = initConfig.getStringValue("BackByte","clearTargetCommand");
const QString lengthOfControlCommand = initConfig.getStringValue("BackByte","lengthOfControlCommand");
const QString sequenceOfControlCommand = initConfig.getStringValue("BackByte","sequenceOfControlCommand");
const QString zeroHex = initConfig.getStringValue("BackByte","zeroHex");

//状态请求间隔ms
const int StateTime = initConfig.getIntValue("Timer","StateTime");

//电量请求间隔
const int VoltageTime =  initConfig.getIntValue("Timer","VoltageTime");

//断开重连时间
const int ReconnectTime =  initConfig.getIntValue("Timer","ReconnectTime");

//移动速度
const int MoveSpeed = initConfig.getIntValue("OtherArgument","MoveSpeed");

//靶标数目
//const int TargetNumber = initConfig.getIntValue("OtherArgument","TargetNumber");
//const int TargetNumber = 22;

//标签缩小比例
const double TargetScaleBody = 0.0857;

//靶标大小
const int TargetSize = initConfig.getIntValue("OtherArgument","TargetSize");



//详细信息子弹大小
const int BulletSizeOne =  initConfig.getIntValue("OtherArgument","BulletSizeOne");

//靶标列表子弹大小
const int BulletSizeTwo =  initConfig.getIntValue("OtherArgument","BulletSizeTwo");

const int BulletSizeThree = initConfig.getIntValue("OtherArgument","BulletSizeThree");

//列表子弹数量
const int BulletNumber = initConfig.getIntValue("OtherArgument","BulletNumber");

const double FilterNumber = initConfig.getDoubleValue("OtherArgument","FilterNumber");

//按钮总数量
const int toolBarNumber = 10;

//校准范围边界
const double LeftLimit = initConfig.getDoubleValue("Rectangle","LeftLimit");
const double RightLimit = initConfig.getDoubleValue("Rectangle","RightLimit");
const double UpLimit = initConfig.getDoubleValue("Rectangle","UpLimit");
const double DownLimit = initConfig.getDoubleValue("Rectangle","DownLimit");

// 控制命令接口路由值 10000-19999
// RewriteTargetId 重写地址
const int RewriteTargetId = 10000;
// ClearTarget 清除靶标
const int 	ClearTarget = 10001;
// OpenCalibrationTargetById 开启校准
const int OpenCalibrationTargetById = 10002;
// CloseCalibrationTargetById 关闭校准
const int CloseCalibrationTargetById = 10003;
// OpenInfoEntry 打开信息录入
const int OpenInfoEntry = 10004;
// CloseInfoEntry 关闭信息录入
const int CloseInfoEntry = 10005;
// UserGrouping 配置分组
const int UserGrouping = 10006;
//绑定人员信息
const int    BindInfo = 10007;
//更改系统id  system_id
const int ChangeSystemId = 10008;
//二次校准
const int TwoCheck = 10009;
//升降
const int upORdown = 10010;

// 获取信息接口路由值 20000-29999
// GetTargetInfo 获取
const int    GetTargetInfo = 20000;
// GetTargetState 获取靶标状态
const int    GetTargetState = 20001;
// GetShowInfo 获取展示信息
const int    GetShowInfo = 20002;
// GetVoltage 获取电压
const int    GetVoltage = 20003;

const int GetTargetName = 20004;

//后端主动发送当前子弹信息
const int CurrentBullet = 20005;
//后端发送查找到的成绩信息
const int scoreBullet = 20006;

//发送日期
const int currentData = 20007;
//发送靶号和组号
const int addrAndGroupnumber = 20008;
